package com.cloudcc.cloudframe.plugin;

import android.content.Context;

import com.cloudcc.cloudframe.CApplication;
import com.cloudcc.mobile.R;

/**
 * 提示文件 操作 --------------------------<br/>
 * 
 * @author wang_zq 2014-12-27<br>
 *         ----------------------------<br/>
 */
public class MessageManager {

	private static MessageManager instance;
	private final Context mContext;

	private MessageManager(Context context) {
		this.mContext = context;
	}

	public static MessageManager getInstance() {
		if (instance == null) {
			instance = new MessageManager(CApplication.getApp());
		}
		return instance;
	}

	/**
	 * 获得字符传
	 * 
	 * @param id
	 * @return
	 */
	public String getString(int id) {
		String string = mContext.getString(id);
		return string;
	}

	/**
	 * 没有网络
	 * 
	 * @return
	 */
	public String getNoNet() {
		return getString(R.string.meg_net_no);
	}

	/**
	 * 没有网络
	 * 
	 * @return
	 */
	public String getWaitNetRequest() {
		return getString(R.string.meg_net_request);
	}

	/**
	 * 输入非法
	 */
	public String getInputIllegl() {
		return getString(R.string.meg_input_illegal);
	}

	/**
	 * 网络访问失败
	 * 
	 * @return
	 */
	public String getNetError() {
		return getString(R.string.meg_net_error);
	}

	/**
	 * 数据异常
	 * 
	 * @return
	 */
	public String getDataException() {
		return getString(R.string.meg_data_exception);
	}

	/**
	 * 获取网络数据失败
	 * 
	 * @return
	 */
	public String getDataNetException() {
		return getString(R.string.meg_data_net_exception);
	}

	/**
	 * 正在请求网络
	 * 
	 * @return
	 */
	public String getNetRequest() {
		return getString(R.string.meg_net_request);
	}

	/**
	 * json解析失败
	 * 
	 * @return
	 */
	public String getJsonError() {
		return getString(R.string.meg_json_parser);
	}

}
